#!/bin/bash
# whiletest.sh - A Test for while() with a counter.

declare -i cnt      # 定义一个整形计数器变量

cnt=1

while [ $cnt != 20 ]
do
    echo "Print for cnt = $cnt"
    cnt=$cnt+1      # 计数器执行++动作
done
